home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / drdobbs / ddjcompr / ashford / comp.h < prev    next >
Text File  |  1991-06-29  |  1KB  |  38 lines

  1. /*
  2.     Define storage allocation parameters
  3.  
  4.     FAR_TABLES dynamically allocates dictionary using far pointers
  5.     SPLIT_TABLES allows a dictionary size over 32K
  6. */
  7.  
  8. #define FAR_TABLES
  9. #undef SPLIT_TABLES
  10.  
  11. /*  Define size of dictionary and other useful parameters  */
  12.  
  13. #define NDICT          28000U    /* Size of circular dictionary */
  14. #define MAX_ORDER      8        /* Maximum order accomodated by the model */
  15. #define MAX_CHAR_CODE  256      /* Number of symbols accepted by model */
  16.  
  17. #define HTBL1_SIZE     256        /* Hash table size - equals character set size */
  18.  
  19. #define MIN_STR        3        /* Minimum string length */
  20. #define MAX_STR_CODE   64       /* Maximum code value for string length */
  21.  
  22. #define MAX_STR        (MIN_STR+MAX_STR_CODE+254)
  23. #define MAX_STR_SAVE   (MIN_STR)
  24. #define MAX_SYM        (MAX_CHAR_CODE + 2)
  25.  
  26. #define MAX_DICT       (NDICT+MAX_ORDER)
  27. #define NIL_DICT_PTR   0
  28.  
  29. #define SWITCH_SYM     -1
  30. #define END_OF_FILE    MAX_CHAR_CODE
  31. #define START_STRING   (MAX_CHAR_CODE + 1)
  32.  
  33.  
  34. void InitModel (int);
  35. void CompressSymbol (int);
  36. int ExpandSymbol (void);
  37. void CloseModel (void);
  38.